﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using InstantMessenger.MessengerServices;
using InstantMessenger.Interaction;

namespace InstantMessenger.UserControls
{
    /// <summary>
    /// User control login
    /// Created by: Dinh Quoc Vuong
    /// Created date: Oct 11th 2011
    /// </summary>
    [System.ComponentModel.ToolboxItem(true)]
    public partial class UCLogin : UCBase
    {
        #region Constructors
        /// <summary>
        /// Default constructor for design
        /// </summary>
        public UCLogin()
        {
            InitializeComponent();            
        }

        /// <summary>
        /// Init with control changable
        /// </summary>
        /// <param UCLogin="controlChangable"></param>
        public UCLogin(IControlChangable controlChangable, MessengerServicesClient service)
            : base(controlChangable, service)
        {
            InitializeComponent();            
        }

        /// <summary>
        /// Constructor set service
        /// </summary>
        /// <param name="currentService"></param>
        public UCLogin(MessengerServicesClient currentService)
            : base(currentService)
        {
            InitializeComponent();
        }
        #endregion

        #region Navigations
        private void lnkRegisterAnAccount_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _conrolChangable.ChangeToRegiserControl();
        }

        private void lnkForgotPassword_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            _conrolChangable.ChangeToForgotPassword();
        }
        #endregion
    }
}
